<?php
$this->breadcrumbs=array(
	'Jobs',
);
?>
<!--Begin Show JOB-->
			<td width="666" height="100" valign="top" class="tab">
				<div class="blok"><span class="name">Recent Projects</span><br><br>
					<div class="prjt-wrap">
						<div id="project_table_wrapper" class="dataTables_wrapper">
							<div class="toolbar"></div>
							<div id="top_pagination"></div>
							<div class="clear"></div>
							<div id="project_table_processing" class="dataTables_processing" style="visibility: hidden;">Loading...</div>
							<table id="project_table" class="dataTable" cellspacing="0" cellpadding="0" border="0" style="">
								<thead>
									<tr>
										<th class="sorting_disabled">Project Name</th>
										<th class="ns_align-center sorting" width="8%" style="width: 8%;">Bids</th>
										<th class="ns_align-center sorting" width="20%" style="width: 9%;">Avg (USD)</th>
										<th class="sorting_disabled ns_align-center" width="20%" style="width: 9%;">Duration</th>
										<th class="sorting_disabled" width="20%" style="width: 20%;">Job Type</th>
										<th class="sorting_desc" width="8%" style="width: 10%;">Started</th>
										<th class="sorting" width="10%" style="width: 10%;">Time Left</th>
									</tr>
								</thead>
								<tbody>
								<?php 
								//if (isset($_GET['search']))
									//$model = $dataProvider->getData();
								foreach ($model as $key):
								//$id_job = Bidjob::model()->findByAttributes(array('id_job'=>$key->id_job));
								?> 
									<tr class="odd" style="cursor: pointer;" project_id="<?php echo $key->id; ?>" bid_placed_check="<?php //echo $key->id_winner; ?>">
										<td>
											<div class="title">
												<a href="" style="color:black">
													<?php echo CHtml::link(substr($key->name, 0, 30), array('job/view', 'id'=>$key->id)); ?>
												</a>
											</div>
											<div class="description" style="display: none;">
												<?php echo substr($key->jobdesc, 0, 75); ?>
											</div>
										</td>
										<td class="ns_align-center">
											Bid Now!
										</td>
										<td class="ns_align-center">
											<?php echo $key->budget;?>
										</td>
										<td class="ns_align-center">
											<?php echo $key->duration;?>
										</td>
										<td>
											<?php echo CHtml::link(substr($key->subjobtype_id, 0, 40), array('job/view', 'id'=>$key->id)); ?>
										</td>
										<td class="sorting_1">Today</td>
										<td><?php //if($id_job) echo $id_job->timepost;
													//else echo ''; ?></td>
									</tr>
								<?php endforeach; ?>
								</tbody>
							</table>
							<div id="project_table_info" class="dataTables_info" style="align:right">
								<?php //if(!isset($_GET['search'])) 
										$this->widget("CLinkPager", array('pages'=>$page));?>
							</div>
						</div>
					</div>
					
				</div>
			</td><!--End Show JOB-->